package com.bayern.muchen.blog.service.management.impl;

import com.bayern.muchen.blog.dao.management.ArticleManageDao;
import com.bayern.muchen.blog.entity.Article;
import com.bayern.muchen.blog.service.management.ArticleManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @author QIUYANG
 * @title: ArticleManageServiceImpl
 * @description: 文章管理
 * @date 12/1/20214:51 PM
 */
@Service
public class ArticleManageServiceImpl implements ArticleManageService {
    @Autowired
    ArticleManageDao articleManageDao;

    @Override
    public int insertArticle(Article article) {
        article.setGmtCreate(new Date());
        //TODO 博客内容存ES 或者 REDIS ?
        int result = articleManageDao.insertArticle(article);
        return result;
    }
}
